^
1
|
Details —
A single action in detail. |
Unlocking something with something (past tense unlocked it with)
Unlocking undoes the
effect of locking, and renders the noun openable again provided that the
actor is carrying the right key (which must be the second noun).
Unlocking can be performed on any kind of thing which provides the either/or
properties lockable, locked, openable and open. The 'can't unlock without a lock
rule' tests to see if the noun both provides the lockable property, and if
it is in fact lockable: it is then assumed that the other properties can
safely be checked. In the Standard Rules, the container and door kinds both
satisfy these requirements.
We can create a new kind on which opening, closing, locking and unlocking
will work thus: 'A briefcase is a kind of thing. A briefcase can be openable.
A briefcase can be open. A briefcase can be lockable. A briefcase can be
locked. A briefcase is usually openable, lockable, open and unlocked.'
Inform checks whether the key fits using the 'can't unlock without the correct
key rule'. To satisfy this, the actor must be directly holding the second
noun, and it must be the current value of the 'matching key' property for
the noun. (This property is seldom referred to directly because it is
automatically set by assertions like 'The silver key unlocks the wicket
gate.')
The Standard Rules provide locking and unlocking actions at a fairly basic
level: they can be much enhanced using the extension Locksmith by Emily
Short, which is included with all distributions of Inform.
Typed commands leading to this action
"unlock [a locked lockable thing] with [something]"
"unlock [a lockable thing] with [something]"
"open [something] with [something]"
"open [a locked lockable thing] with [something]"
"open [a lockable thing] with [something]"
Rules controlling this action
check an actor unlocking something with can't unlock without a lock rule name unlist 1
check an actor unlocking something with can't unlock what's already unlocked rule name unlist 1
check right second rule name unlist 1
check must be able to reach the key rule name unlist
NB: the right second rule is listed instead of the can't unlock without the correct key rule in the check unlocking it with rulebookcarry out unlocking the lockbox with the wide key
carry out unlocking something with a passkey standard passkey unlocking rule name unlist
carry out an actor unlocking something with standard unlocking rule name unlist
after unlocking the beige door with the thin key
after unlocking the lockbox with the wide key
report someone trying unlocking something with a passkey observe someone unlocking rule name unlist
report an actor unlocking something with standard report unlocking rule name unlist 2